<template>
    <li @click="handleClick">
        {{item}}
    </li>
</template>

<script>
import store from './store';

export default {
    props:['item'],
    // inject:["navTitle","app"],
    methods:{
        handleClick(){
            // console.log(this.item);
            // console.log(this.navTitle);
            // this.$emit('change',this.item)

            // this.app.navTitle = this.item

            // store.commit('change',this.item)

            store.publish(this.item)
        }
    }
}
</script>